<?php
// 常量库

//当前url
define("thisUrl", "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
// 获取语言
define("lang", getLang());
// 定义redis key
define('redisKey', md5(root) . '_');
//常用html
const must             = "<span class='red' title='必填'>*</span>&nbsp;";
const space            = "<div class='space'></div>";
const clear            = "<div class='clear'></div>";
const orderByAscStyle  = "<span class='red'>↑</span>";
const orderByDescStyle = "<span class='red'>↓</span>";
/*正则表达式*/
const checkTel     = "/^0?(1[3-9])[0-9]{9}$/";                                                                                                                                                                                                                                                                                                                               //手机号码正则表达式
const checkEmail   = "/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/";                                                                                                                                                                                                                                                                                                //邮箱正则表达式
const checkInteger = "/^\d*$/";                                                                                                                                                                                                                                                                                                                                              //正整数正则表达式
const checkPrice   = "/^[0-9]+(.[0-9]{1,8})?$/";                                                                                                                                                                                                                                                                                                                             //价格正则表达式
const checkString  = "/^[\x{4e00}-\x{9fa5}A-Za-z0-9]+$/u";                                                                                                                                                                                                                                                                                                                   //只允许汉字、大小写字母和数字
const checkYm      = "/^20[012][0-9](0[1-9]|1[012])$/";                                                                                                                                                                                                                                                                                                                      //年份月份
const checkYmLine  = "/^20[012][0-9]-(0[1-9]|1[012])$/";                                                                                                                                                                                                                                                                                                                     //年份月份，有短横线
const checkUrl     = "/^((https?|ftp|news):\/\/)?([a-z]([a-z0-9\-]*[\.。])+([a-z]{2}|aero|arpa|biz|com|coop|edu|gov|info|int|jobs|mil|museum|name|nato|net|org|pro|travel)|(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))(\/[a-z0-9_\-\.~]+)*(\/([a-z0-9_\-\.]*)(\?[a-z0-9+_\-\.%=&]*)?)?(#[a-z][a-z0-9_]*)?$/";    //网址正则
const deline       = "<div class='delete-ico' onclick=\"decline(this)\"></div>";
const arrow        = '<span class="arrow"></span>';
const lastone      = '<span class="lastone"></span>';
const listAdd      = "<img src='".root."img/control/list_add.svg'>";
const listDel      = "<img src='".root."img/control/list_del.svg'>";
const listCopy      = "<img src='".root."img/control/list_copy.svg'>";

//代理
const PROXYTYPE = CURLPROXY_SOCKS5;
const PROXY = '127.0.0.1';
const PROXYPORT = 10801;
